package com.jiepu.daily.corejava.advanceed.part3exception.day0727;

/**
 * @Description:
 * @author: xinjie.txt
 * @date: 2020/7/28  14:47
 */
public class AssertionDemo {
	public static void main(String[] args) {
		boolean flag = true;
		assert flag : "mistake!!";
		Object instance = getInstance();
		assert instance == null : "Error";
		getInstance();

	}

	static Object getInstance() {
		System.out.println("ok");
		return new Object();

	}
}
